var t = require;
var e = module;
var o = exports;
Object.defineProperty(o, "__esModule", {
    value: !0
}),
o.BaseStorage = void 0;
var i = function() {
    function t() {}
    return t.setItem = function(t, e) {
        cc.sys.localStorage.setItem(t, JSON.stringify(e))
    },
    t.getItem = function(t, e) {
        void 0 === e && (e = {});
        var o = cc.sys.localStorage.getItem(t);
        return o || (cc.sys.localStorage.setItem(t, JSON.stringify(e)), o = cc.sys.localStorage.getItem(t)),
        JSON.parse(o)
    },
    t.setInt = function(t, e) {
        cc.sys.localStorage.setItem(t, e)
    },
    t.getInt = function(t, e) {
        return cc.sys.localStorage.getItem(t) || this.setInt(t, e),
        parseInt(cc.sys.localStorage.getItem(t))
    },
    t.setString = function(t, e) {
        cc.sys.localStorage.setItem(t, e)
    },
    t.getString = function(t, e) {
        return void 0 === e && (e = ""),
        cc.sys.localStorage.getItem(t) || this.setString(t, e),
        cc.sys.localStorage.getItem(t)
    },
    t.removeKey = function(t) {
        cc.sys.localStorage.removeItem(t)
    },
    t.clearData = function() {
        cc.sys.localStorage.clear()
    },
    t
} ();
o.BaseStorage = i